﻿@model SenUser
@{
    ViewData["Title"] = "编辑用户信息";
}

<div class="content-page-header">
    <h2>编辑用户信息</h2>
    <button class="btn btn-outline" onclick="backToPrevPage()">
        <i class="fas fa-arrow-left"></i> 返回列表
    </button>
</div>

<div class="content-card">
    <form method="post" asp-controller="user" asp-action="edit" class="row g-3" enctype="multipart/form-data">
        <div class="col-md-6">
            <label class="form-label" for="username">用户名</label>
            <input type="text" id="username" name="username" class="form-control" placeholder="请输入用户名" value="@Model?.UserName">
            <span asp-validation-for="UserName" class="text-danger small"></span>
        </div>
        <div class="col-md-6">
            <label class="form-label" for="name">姓名</label>
            <input type="text" id="name" name="name" class="form-control" placeholder="请输入用户姓名" value="@Model?.Name">
            <span asp-validation-for="Name" class="text-danger small"></span>
        </div>

        <div class="col-md-6">
            <label class="form-label" for="name">密码</label>
            <input type="password" id="password" name="password" class="form-control" placeholder="编辑时留空则不修改">
        </div>
        <div class="col-md-6">
            <label class="form-label">确认密码</label>
            <input type="password" id="password" name="password" class="form-control" placeholder="编辑时留空则不修改">
        </div>

        <div class="col-md-6">
            <label class="form-label">邮箱</label>
            <input type="email" class="form-control" value="admin@example.com">
        </div>
        <div class="col-md-6">
            <label class="form-label">手机号</label>
            <input type="tel" class="form-control" value="13800138000">
        </div>

        <div class="col-md-6">
            <label class="form-label">角色</label>
            <select class="form-select">
                <option selected>超级管理员</option>
                <option>内容编辑</option>
                <option>财务人员</option>
                <option>普通用户</option>
            </select>
        </div>
        <div class="col-md-6">
            <label class="form-label">状态</label>
            <div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="status" id="active" checked>
                    <label class="form-check-label" for="active">正常</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="status" id="disabled">
                    <label class="form-check-label" for="disabled">禁用</label>
                </div>
            </div>
        </div>

        <div class="col-12">
            <label class="form-label">备注</label>
            <textarea class="form-control" rows="3">系统管理员账户</textarea>
        </div>

        <div class="col-12 mt-4">
            <button type="submit" class="btn btn-primary me-2 px-4">保存</button>
            <a asp-controller="user" asp-action="index" class="btn btn-outline-secondary">取消</a>
        </div>
    </form>
</div>